package com.zoe.app.controller;

import com.zoe.app.entity.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zoe.Zhang
 * @date 2022/06/09
 * @description
 */
@RestController
public class UserController {
    @GetMapping("/")
    public String hello() {
        return "hello";
    }

    @PostMapping("/")
    public User user(@RequestBody User user) {
        return user;
    }

    @PostMapping("/user")
    public User addUser(User user) {
        return user;
    }
}
